package com.cdl;

/**
 * @author cdl
 * @date  2025/9/26
 */
public class Demo2 {

    private int a;
    static  int b;
    public static void main(String[] args) {
        Demo2 lv=new Demo2();
        System.out.println(lv.a);
        System.out.println(b);
        //System.out.println(c);

        boolean hasMoney = true;
        boolean hasGrilFriedn = false;

        int value_int =61;
        char value_char =(char)value_int;
        System.out.println(value_char);

        int radix =10;
        int value1_int =6;
        char value1_char = Character.forDigit(value1_int,radix);
        System.out.println(value1_char);

        int value2_int = 23;
        char value2_char = Integer.toString(value2_int).charAt(0);
        System.out.println(value2_char);

        //使用 Integer 包装器类型
        Integer integerValue = new Integer(43);
        System.out.println("整数值：" + integerValue);

        //将字符串转换为整数
        String numberString = "123";
        int parseNumber = Integer.parseInt(numberString);
        System.out.println("整数值：" + parseNumber);

        //使用Character包装器类型
        Character charValue = new Character('A');
        System.out.println(charValue);

        //检查字符是否为数字
        char testChar = '9';
        if (Character.isDigit(testChar)){
            System.out.println("字符是个数字");
        }

        int[] arrays = {1,2,3};
        System.out.println(arrays);

        int a =1,b =13;

        int c = ~a;
        System.out.println("~a: " + c + ", 二进制是： " + Integer.toBinaryString(c));

        c = a >>> 2;
        System.out.println("~a: " + c + ", 二进制是： " + Integer.toBinaryString(c));

    }

}
